home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mgr / sparcmgr / demo2.zoo / demo / ex / Makefile < prev    next >
Encoding:
Makefile  |  1989-08-30  |  6.0 KB  |  194 lines

  1. #
  2. # Copyright (c) 1980 Regents of the University of California.
  3. # All rights reserved.  The Berkeley software License Agreement
  4. # specifies the terms and conditions for redistribution.
  5. #
  6. #    @(#)Makefile    7.14 (Berkeley) 3/9/87
  7. #    @(#)Makefile    1.5 (Bellcore)    87/04/24
  8. #
  9. VERSION=3.7
  10. #
  11. # Ex skeletal makefile for VAX VM/Unix 4.2BSD
  12. #
  13. # NB: This makefile doesn't indicate any dependencies on header files.
  14. #
  15. # Ex is very large - this version will not fit on PDP-11's without overlay
  16. # software.  Things that can be turned off to save
  17. # space include LISPCODE (-l flag, showmatch and lisp options), UCVISUAL
  18. # (visual \ nonsense on upper case only terminals), CHDIR (the undocumented
  19. # chdir command.)  CRYPT includes the code to edit encrypted files (the -x
  20. # option, like ed.)  VMUNIX makes ex considerably larger, raising many limits
  21. # and improving speed and simplicity of maintenance.  It is suitable only
  22. # for a VAX or other large machine, and then probably only in a paged system.
  23. #
  24. # Don't define VFORK unless your system has the VFORK system call,
  25. # which is like fork but the two processes have only one data space until the
  26. # child execs. This speeds up ex by saving the memory copy.
  27. #
  28. # If your system expands tabs to 4 spaces you should -DTABS=4 below
  29. #
  30. BINDIR=    /usr/ucb
  31. NBINDIR=/usr/new
  32. LIBDIR=    /usr/lib
  33. FOLD=    ${BINDIR}/fold
  34. CTAGS=    ${BINDIR}/ctags
  35. XSTR=    ${BINDIR}/xstr
  36. DEBUGFLAGS=    -g
  37. NONDEBUGFLAGS=    -O
  38. DEB=    ${NONDEBUGFLAGS}    # or ${DEBUGFLAGS} to to debug
  39. DEB=    ${DEBUGFLAGS}
  40. OPTIONS= -DCRYPT -DLISPCODE -DCHDIR -DUCVISUAL -DVFORK -DVMUNIX -DFASTTAG\
  41.     -DUNIX_SBRK -DMGR
  42. CFLAGS=    -DTABS=8 ${OPTIONS} ${DEB}
  43. LDFLAGS=    -z        # or -i or -n
  44. TERMLIB=    -ltermcap
  45. MKSTR=    ${BINDIR}/mkstr
  46. CXREF=    ${BINDIR}/cxref
  47. INCLUDE=/usr/include
  48. PR=    pr
  49. OBJS=    ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o \
  50.     ex_data.o ex_extern.o ex_get.o ex_io.o ex_put.o ex_re.o \
  51.     ex_set.o ex_subr.o ex_tagio.o ex_temp.o ex_tty.o ex_unix.o \
  52.     ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o \
  53.     ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o \
  54.     printf.o bcopy.o strings.o
  55. HDRS=    ex.h ex_argv.h ex_re.h ex_temp.h ex_tty.h ex_tune.h ex_vars.h ex_vis.h
  56. SRC1=    ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c
  57. SRC2=    ex_data.c ex_get.c ex_io.c ex_put.c ex_re.c
  58. SRC3=    ex_set.c ex_subr.c ex_tagio.c ex_temp.c ex_tty.c ex_unix.c
  59. SRC4=    ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c
  60. SRC5=    ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c
  61. SRC6=    printf.c bcopy.c expreserve.c exrecover.c
  62. MISC=    makefile READ_ME rofix
  63. VGRIND=    csh /usr/ucb/vgrind
  64. VHDR=    "Ex Version ${VERSION}"
  65.  
  66. .c.o:
  67. # ifdef VMUNIX
  68.     ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
  69. # else
  70. #    ${MKSTR} - ex${VERSION}strings x $*.c
  71. #    ${CC} -E ${CFLAGS} x$*.c | ${XSTR} -c -
  72. #    rm -f x$*.c
  73. # endif
  74.     ${CC} ${CFLAGS} -c x.c 
  75.     mv x.o $*.o
  76.  
  77. all:    a.out exrecover expreserve
  78.  
  79. a.out: ${OBJS}
  80.     @echo loading a.out
  81.     @${CC} ${LDFLAGS} ${OBJS} ${TERMLIB}
  82.  
  83. tags:    /tmp
  84.     ${CTAGS} -w ex.[hc] ex_*.[hc]
  85.  
  86. ${OBJS}: ${HDRS}
  87.  
  88. ex_vars.h:    ex_data.c
  89.     csh makeoptions ${CFLAGS}
  90.  
  91. bcopy.o:    bcopy.c
  92.     ${CC} -c ${CFLAGS} bcopy.c
  93.  
  94. # xstr: hands off!
  95. strings.o: strings
  96.     ${XSTR}
  97.     ${CC} -c -S xs.c
  98.     ed - <rofix xs.s
  99.     ${AS} -o strings.o xs.s
  100.     rm xs.s
  101.     
  102. exrecover: exrecover.o
  103.     ${CC} ${CFLAGS} exrecover.o ex_extern.o -o exrecover
  104.  
  105. exrecover.o: exrecover.c
  106.     ${CC} ${CFLAGS} -c -O exrecover.c
  107.  
  108. expreserve: expreserve.o
  109.     ${CC} expreserve.o -o expreserve
  110.  
  111. expreserve.o:
  112.     ${CC} ${CFLAGS} -c -O expreserve.c
  113.  
  114. clean:
  115. #    If we dont have ex we cant make it so don't rm ex_vars.h
  116.     -rm -f a.out exrecover expreserve strings core errs trace
  117.     -rm -f *.o x*.[cs]
  118.  
  119. # install a new version for testing in /usr/new
  120. ninstall: a.out
  121.     -rm -f ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi ${DESTDIR}${NBINDIR}/view
  122.     cp a.out ${DESTDIR}${NBINDIR}/ex
  123. #    -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings
  124.     ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/vi
  125.     ln ${DESTDIR}${NBINDIR}/ex ${DESTDIR}${NBINDIR}/view
  126.     chmod 1751 ${DESTDIR}${NBINDIR}/ex
  127.  
  128. # install in standard place (/usr/ucb)
  129. install: a.out exrecover expreserve
  130.     -rm -f ${DESTDIR}/${BINDIR}/ex
  131.     -rm -f ${DESTDIR}/${BINDIR}/vi
  132.     -rm -f ${DESTDIR}/${BINDIR}/view
  133.     -rm -f ${DESTDIR}/${BINDIR}/edit
  134.     -rm -f ${DESTDIR}/${BINDIR}/e
  135.     -rm -f ${DESTDIR}/usr/bin/ex
  136.     install -s -m 1751 a.out ${DESTDIR}/${BINDIR}/ex
  137. #    cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings
  138. #    ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/edit
  139. #    ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/e
  140.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/vi
  141. #    ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/view
  142. #    ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/usr/bin/ex
  143. #    chmod 1755 ${DESTDIR}/${BINDIR}/ex
  144.     install -s exrecover ${DESTDIR}/${LIBDIR}/ex${VERSION}recover
  145.     install -s expreserve ${DESTDIR}/${LIBDIR}/ex${VERSION}preserve
  146. # The following line normally fails.  This is OK.
  147. #    -mkdir ${DESTDIR}/usr/preserve
  148.  
  149. # move from /usr/new to /usr/ucb
  150. newucb: a.out
  151.     -rm -f ${DESTDIR}/${BINDIR}/ex
  152.     -rm -f ${DESTDIR}/${BINDIR}/vi
  153.     -rm -f ${DESTDIR}/${BINDIR}/edit
  154.     -rm -f ${DESTDIR}/${BINDIR}/e
  155.     -rm -f ${DESTDIR}/usr/bin/ex
  156.     mv ${DESTDIR}/${NBINDIR}/ex ${DESTDIR}/${NBINDIR}/ex
  157.     -rm -f ${DESTDIR}/${NBINDIR}/vi
  158.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/edit
  159.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/e
  160.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/${BINDIR}/vi
  161.     ln ${DESTDIR}/${BINDIR}/ex ${DESTDIR}/usr/bin/ex
  162.     chmod 1755 ${DESTDIR}/${BINDIR}/ex
  163.  
  164. lint:
  165.     lint ${CFLAGS} ex.c ex_?*.c
  166.     lint ${CFLAGS} -u exrecover.c
  167.     lint ${CFLAGS} expreserve.c
  168.  
  169. print:
  170.     @${PR} READ* BUGS
  171.     @${PR} makefile*
  172.     @${PR} /etc/termcap
  173.     @(size -l a.out ; size *.o) | ${PR} -h sizes
  174.     @${PR} -h errno.h ${INCLUDE}/errno.h
  175.     @${PR} -h setjmp.h ${INCLUDE}/setjmp.h
  176.     @${PR} -h sgtty.h ${INCLUDE}/sgtty.h
  177.     @${PR} -h signal.h ${INCLUDE}/signal.h
  178.     @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h
  179.     @${PR} -h sys/types.h ${INCLUDE}/sys/types.h
  180.     @ls -ls | ${PR}
  181.     @${CXREF} *.c | ${PR} -h XREF
  182.     @${PR} *.h *.c
  183. vgrind:
  184.     tee index < /dev/null
  185.     ${VGRIND} -h ${VHDR} ${HDRS}
  186.     ${VGRIND} -h ${VHDR} ${SRC1}
  187.     ${VGRIND} -h ${VHDR} ${SRC2}
  188.     ${VGRIND} -h ${VHDR} ${SRC3}
  189.     ${VGRIND} -h ${VHDR} ${SRC4}
  190.     ${VGRIND} -h ${VHDR} ${SRC5}
  191.     ${VGRIND} -h ${VHDR} ${SRC6}
  192.     ${VGRIND} -n -h ${VHDR} ${MISC}
  193.     ${VGRIND} -i -h ${VHDR} index
  194.